jQuery(document).ready(function () {
	jQuery(".leftmenu ul li").removeClass("current");
	jQuery(".leftmenu ul li a.grid").parent().addClass("current");
	
	jQuery(".apply-change").click(function () {
		var action = jQuery(".action-value").val();
		multiple_action(action);
	});
});

function multiple_action(action) {
	var ids = "";
	jQuery("#list-table tbody tr td input[type=checkbox]").each(function (item, data) {
		if (jQuery(this).is(':checked')) {
			ids += jQuery(this).val() + ",";
		}
	});
	showAjaxEffect();
	jQuery.get(server + "/admin/process-site", {ids: ids, action: action}, function(data) {
		hideAjaxEffect();
		location.reload();
	});
}